package com.juqimiao.linn.command.mock;

import com.juqimiao.linn.command.CommandExecutor;
import com.juqimiao.linn.command.CommandExecutorI;
import com.juqimiao.linn.exception.BasicError;
import com.juqimiao.linn.transfer.Response;
import com.juqimiao.linn.transfer.query.builders.ResponseBuilder;

@CommandExecutor
public class UpdateCustomerCmdExt implements CommandExecutorI<Response, UpdateCustomerCmd> {
    @Override
    public Response execute(UpdateCustomerCmd cmd) {
        if (cmd.getBusinessPoint() != null) {
            //It will throw an exception.
            Integer n = Integer.valueOf("aaa");
        }

        return ResponseBuilder.builder().failure(BasicError.BUSINESS_ERROR.getErrorCode(), "msg");
    }
}
